-- GENERATED SPELL FOR [Rajah Haghazed] --


function spell0_18046(pUnit, Event) --@Forceful Cleave,n/a--
pUnit:FullCastSpellOnTarget(35473,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18046', 0, 1)
end

function spell1_18046(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18046', 5256, 1)
end

function spell2_18046(pUnit, Event) --@Shield Charge,n/a--
pUnit:FullCastSpellOnTarget(35472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18046', 641, 1)
end

function spell3_18046(pUnit, Event) --@Shield Wall,Self--
pUnit:FullCastSpellOnTarget(15062,pUnit)
pUnit:RegisterEvent('Sorts_18046', 10286, 1)
end

function Sorts_18046(pUnit, Event)
local choix_sorts_18046 = math.random(0, 3)
if choix_sorts_18046 == 0 then
pUnit:RegisterEvent('spell0_18046', 1, 1)
end
if choix_sorts_18046 == 1 then
pUnit:RegisterEvent('spell1_18046', 1, 1)
end
if choix_sorts_18046 == 2 then
pUnit:RegisterEvent('spell2_18046', 1, 1)
end
if choix_sorts_18046 == 3 then
pUnit:RegisterEvent('spell3_18046', 1, 1)
end
end

function mob18046_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18046', math.random(1500, 3000), 1)
end

function mob18046_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18046_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18046_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18046, 1, 'mob18046_Action')
RegisterUnitEvent(18046, 2, 'mob18046_Leave')
RegisterUnitEvent(18046, 3, 'mob18046_Kill')
RegisterUnitEvent(18046, 4, 'mob18046_Die')
